www.gusucode.com > 给力搜索小偷开源源码 3.0源码程序 > 复件 s.php
<?php require( "config.php" ); require( "ad.php" ); function intercept_str($str,$start,$end,$option){ $strarr=explode($start,$str); $tem=$strarr[1]; if(empty($end)){ return $tem; }else{ $strarr=explode($end,$tem); if($option==1){ return $strarr[0]; } if($option==2){ return $start.$strarr[0]; } if($option==3){ return $strarr[0].$end; }else{ return $start.$strarr[0].$end; } } } function get_contents($url){ $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_TIMEOUT, 1000); $file_contents = curl_exec($ch); curl_close($ch); return $file_contents; } if (empty($_GET["wd"])){ echo "<script>window.location.href='../';</script>"; } $wintop = md5( $site_url.$QQ.md5( $site_url )."给力搜索永久免费,盗卖或盗用死全家!" ); if ( $_SERVER['HTTP_HOST'] ) { $opts = array("http" => array( "method" => "GET", "timeout" => 60 )); $context = stream_context_create( $opts ); header( "content-Type=text/html;charset=gb2312" ); $wd = $_GET['wd']; $pn = $_GET['pn']; $s = urlencode( $wd ); $title = $wd; $url = "http://www.baidu.com/s?wd=".$s."&pn=".$pn.""; $start = "<table width=\"30%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"right\"><tr>"; $end = "<div id=\"foot\">"; $temp = file_get_contents( $url, false, $context ); $content = intercept_str( $temp, $start, $end, 0 ); $content = str_replace( "maxlength=\"100\"><input type=\"submit\" value=\"百度一下\" class=\"btn\">", "maxlength=\"100\" onkeydown=\"if(event.keyCode==32) return false\"><input type=\"submit\" value=\"$value\" class=\"btn\">", $content ); //$content = preg_replace( "/- <a href=\"(.*)\">百度快照<\/a>/i", "- <a href=\"\" class=\"m\"><FONT style=\"color:#666666\">举报</FONT></a>", $content ); $content = str_replace( "百度快照</a>", "快照</a>", $content ); $content = str_replace( "<a href=\"http://www.baidu.com/search/guide.html\" target=\"_blank\">站长帮助</a>", "", $content ); //$content = str_replace( "<a target=\"_blank\" href=\"http://e.baidu.com/?refer=666\"><font color=\"#666666\">推广链接</font></a>", "", $content ); //$content = str_replace( "<font size=-1> - <a href=\"http://e.baidu.com/?id=1\" target=\"_blank\" class=\"m\">推广</a></font>", "", $content ); $content = str_replace( "把百度设为主页</a></span>百度一下", "$home</a></span>$value", $content ); $content = preg_replace( "/ <a href=\"(.*)\">高级搜索<\/a>/i", "<span class=\"seth\"><a href=\"#\" onClick=\"h(this)\">".$home."</a></span>", $content ); $content = str_replace( "百度建议您", "给力建议您", $content ); $content = str_replace( "<li>阅读<a href=\"http://www.baidu.com/search/noresult.html\" target=\"_blank\">帮助</a></li>", "", $content ); $start = "<table width=\"30%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"right\">"; $end = "<div class=\"r ec_bdtg\">"; $adv = intercept_str( $temp, $start, $end, 0 ); $adver = ""; $content = str_replace( $adv, $adver, $content ); $start = "<div class=\"fsblock\">"; $end = "</td></tr></table>"; $adv = intercept_str( $temp, $start, $end, 0 ); $adver = "$guanggaolianjie"; $content = str_replace( $adv, $adver, $content ); $start = "<p class=\"to\""; $end = "</p>"; $adv = intercept_str( $temp, $start, $end, 0 ); $adver = ""; $content = str_replace( $adv, $adver, $content ); $start = "<table cellpadding=\"0\" cellspacing=\"0\" id=\"1\" mu=\"http://app.baidu.com/"; $end = "</td></tr></table><br>"; $adv = intercept_str( $temp, $start, $end, 0 ); $adver = ""; $content = str_replace( $adv, $adver, $content ); include_once( "head.php" ); echo $content; include_once( "foot.php" ); } else { echo "给力搜索永久免费,盗卖或盗用死全家!"; } ?>